package com.antdesignbackend.backend.service.impl;

import com.antdesignbackend.backend.entity.FactoryRecord;
import com.antdesignbackend.backend.entity.entityVo.FactoryRecordVo;
import com.antdesignbackend.backend.mapper.FactoryRecordMapper;
import com.antdesignbackend.backend.service.FactoryRecordService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FactoryRecordServiceImpl extends ServiceImpl<FactoryRecordMapper, FactoryRecord> implements FactoryRecordService {
    @Autowired
    FactoryRecordMapper factoryRecordMapper;
    @Override
    public List<FactoryRecordVo> search(@Param(Constants.WRAPPER) QueryWrapper<FactoryRecordVo> factoryRecordVoQueryWrapper, Page<FactoryRecordVo> factoryRecordVoPage){
        return factoryRecordMapper.search(factoryRecordVoQueryWrapper,factoryRecordVoPage);
    };
    public Integer count(@Param(Constants.WRAPPER) QueryWrapper<FactoryRecordVo> factoryRecordVoQueryWrapper){
        return factoryRecordMapper.count(factoryRecordVoQueryWrapper);
    };
}
